What is the time complexity of following code ?
int sumOfDigits(int n){
        int sum;
        if(n < 10){
            return n;
        }
        sum = (n % 10) + sumOfDigits(n / 10);
        return sum;
}

Options
O(logn) - log is to the base 10
O(n)
O(n^2)
None of these


O(logn) - log is to the base 10
